﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using BarrierGenarator.Net;

namespace BarrierGenarator
{
    public partial class Frm_Login : Form
    {
        public Frm_Login()
        {
            InitializeComponent();
            tbx_pwd.UseSystemPasswordChar = false;
            tbx_pwd.PasswordChar = '*';
        }

        private void btn_login_Click(object sender, EventArgs e)
        {
            var result = HttpRequest.Login(tbx_username.Text, tbx_pwd.Text);
            if(result=="OK")
            {
                Hide();
                new Frm_CreateMap(tbx_username.Text).ShowDialog();
            }
            else
            {
                MessageBox.Show(result);
            }
        }
    }
}
